from app.api.deps import SessionDep
from app.crud import create_zentao_data
from app.models import ZentaoData
from fastapi import APIRouter

router = APIRouter(prefix="/zentao", tags=["zentao"])

@router.post("/add")
def add_data(session: SessionDep, zentao_data: ZentaoData):
    data = create_zentao_data(session=session, data=zentao_data)
    return {"status": "success", "data": data}
